package com.ybkj.o2o.sales.entity.passenger;

import com.fasterxml.jackson.annotation.JsonIgnore;

import org.apache.commons.lang3.StringUtils;

import java.io.Serializable;
import java.math.BigDecimal;

/**
 * 乘客.
 * 
 * @author Administrator
 *
 */
public class Passenger implements Serializable {

  /**
   * Andriod设备.
   */
  public static final String DEVICE_ANDROID = "ANDROID";
  /**
   * iOS设备.
   */
  public static final String DEVICE_IOS = "IOS";

  /**
   * 个人.
   */
  public static final Integer TYPE_PASSENGER = 0;

  /**
   * 企业.
   */
  public static final Integer TYPE_ENTERPRISE = 1;

  /**
   * 客户推荐.
   */
  public static final Integer INTRODUCE_TYPE_PASSENGER = 0;
  /**
   * 司机推荐.
   */
  public static final Integer INTRODUCE_TYPE_DRIVER = 1;


  public static final String PASSENGER_CHANNEL_PHONE = "电话预约";
  public static final String PASSENGER_CHANNEL_APP = "APP预约";
  public static final String PASSENGER_CHANNEL_WEIXIN = "微信预约";
  public static final String PASSENGER_CHANNEL_WEB = "网站预约";
  public static final String PASSENGER_CHANNEL_BUDAN = "司机补单";
  public static final String PASSENGER_CHANNEL_MANAGER = "客户经理";
  public static final String PASSENGER_CHANNEL_INVITE = "推荐";


  private Long id;

  private String name; // 乘客姓名

  private String phone; // 乘客电话

  private boolean allowOverdraw;// 是否允许签单

  private BigDecimal drawMoney; // 可提现金额

  private BigDecimal nodrawMoney; // 不可提现金额

  private BigDecimal frozenMoney; // 冻结金额

  private BigDecimal receiptMoney;// 可开票金额

  private Long enterprise_id; // 所属企业Id

  private String enterprise_name;// 所属企业名称

  private String plateNumber; // 车牌号

  private String photo; // 头像地址

  private Long grade_id; // 级别Id

  private String grade_name; // 级别名称

  private boolean inBlackList;// 是否为黑名单乘客

  private Integer type; // 类型:0个人,1企业

  private String idcard; // 身份证号码

  private Integer gender; // 性别

  private String email; // 邮箱

  private String memo; // 备注

  private Double latitude; // 纬度

  private Double longitude; // 经度

  private String address; // 简单地址:如(翰林世家)

  private String created; // 注册时间

  private String updated;

  private Integer version; // 操作版本

  private Long channel_id; // 渠道Id

  private String channel_name;// 渠道名称

  private String appKey; // 用于区别系统

  private Long companyId; // 所属公司Id

  private String companyName; // 所属公司名称

  private String introducer; // 推荐人

  private Integer introduceType;// 推荐人类型：0客户,1司机

  private Double mileage;// 行驶里程(公里)

  @JsonIgnore
  private String cid;

  @JsonIgnore
  private String deviceType;

  @JsonIgnore
  private String appVersion;

  @JsonIgnore
  private String memberEcn;

  @JsonIgnore
  private String memberEcp;


  private static final long serialVersionUID = 1L;

  public Long getId() {
    return id;
  }

  public void setId(Long id) {
    this.id = id;
  }

  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name == null ? null : name.trim();
  }

  public String getPhone() {
    return phone;
  }

  public void setPhone(String phone) {
    this.phone = phone;
  }



  public Long getEnterprise_id() {
    return enterprise_id;
  }

  public void setEnterprise_id(Long enterprise_id) {
    this.enterprise_id = enterprise_id;
  }

  public String getEnterprise_name() {
    return enterprise_name;
  }

  public void setEnterprise_name(String enterprise_name) {
    this.enterprise_name = enterprise_name == null ? null : enterprise_name.trim();
  }

  public String getPlateNumber() {
    return plateNumber;
  }

  public void setPlateNumber(String plateNumber) {
    this.plateNumber = plateNumber == null ? null : plateNumber.trim();
  }

  public String getPhoto() {
    return photo;
  }

  public void setPhoto(String photo) {
    this.photo = photo == null ? null : photo.trim();
  }

  public Long getGrade_id() {
    return grade_id;
  }

  public void setGrade_id(Long grade_id) {
    this.grade_id = grade_id;
  }

  public String getGrade_name() {
    return grade_name;
  }

  public void setGrade_name(String grade_name) {
    this.grade_name = grade_name == null ? null : grade_name.trim();
  }

  public boolean isAllowOverdraw() {
    return allowOverdraw;
  }

  public void setAllowOverdraw(boolean allowOverdraw) {
    this.allowOverdraw = allowOverdraw;
  }

  public boolean isInBlackList() {
    return inBlackList;
  }

  public void setInBlackList(boolean inBlackList) {
    this.inBlackList = inBlackList;
  }

  public Integer getType() {
    return type;
  }

  public void setType(Integer type) {
    this.type = type;
  }

  public String getTypeStr() {
    if (null != type) {
      if (type == 0) {
        return "个人客户";
      } else if (type == 1) {
        return "企业客户";
      }
    }
    return "";
  }

  public String getIdcard() {
    return idcard;
  }

  public void setIdcard(String idcard) {
    this.idcard = idcard == null ? null : idcard.trim();
  }

  public Integer getGender() {
    if (null == gender) {
      return 0;
    }
    return gender;
  }

  public void setGender(Integer gender) {
    this.gender = gender;
  }

  public String getEmail() {
    return email;
  }

  public void setEmail(String email) {
    this.email = email == null ? null : email.trim();
  }

  public String getMemo() {
    return memo;
  }

  public void setMemo(String memo) {
    this.memo = memo == null ? null : memo.trim();
  }

  public Double getLatitude() {
    return latitude;
  }

  public void setLatitude(Double latitude) {
    this.latitude = latitude;
  }

  public Double getLongitude() {
    return longitude;
  }

  public void setLongitude(Double longitude) {
    this.longitude = longitude;
  }

  public String getAddress() {
    return address;
  }

  public void setAddress(String address) {
    this.address = address == null ? null : address.trim();
  }

  public String getCreated() {
    return created;
  }

  public void setCreated(String created) {
    this.created = created;
  }

  public String getUpdated() {
    return updated;
  }

  public void setUpdated(String updated) {
    this.updated = updated;
  }

  public Integer getVersion() {
    return version;
  }

  public void setVersion(Integer version) {
    this.version = version;
  }

  public Long getChannel_id() {
    return channel_id;
  }

  public void setChannel_id(Long channel_id) {
    this.channel_id = channel_id;
  }

  public String getChannel_name() {
    if (StringUtils.isBlank(channel_name)) {
      return "未知";
    }
    return channel_name;
  }

  public void setChannel_name(String channel_name) {
    this.channel_name = channel_name == null ? null : channel_name.trim();
  }

  public String getAppKey() {
    return appKey;
  }

  public void setAppKey(String appKey) {
    this.appKey = appKey == null ? null : appKey.trim();
  }

  public Long getCompanyId() {
    return companyId;
  }

  public void setCompanyId(Long companyId) {
    this.companyId = companyId;
  }

  public String getCompanyName() {
    return companyName;
  }

  public void setCompanyName(String companyName) {
    this.companyName = companyName == null ? null : companyName.trim();
  }

  public String getIntroducer() {
    return introducer;
  }

  public void setIntroducer(String introducer) {
    this.introducer = introducer == null ? null : introducer.trim();
  }

  public Integer getIntroduceType() {
    return introduceType;
  }

  public void setIntroduceType(Integer introduceType) {
    this.introduceType = introduceType;
  }

  public String getCid() {
    return cid;
  }

  public void setCid(String cid) {
    this.cid = cid;
  }

  public String getDeviceType() {
    return deviceType;
  }

  public void setDeviceType(String deviceType) {
    this.deviceType = deviceType;
  }

  public String getAppVersion() {
    return appVersion;
  }

  public void setAppVersion(String appVersion) {
    this.appVersion = appVersion;
  }

  public Double getMileage() {
    if (null == mileage) {
      return 0D;
    }
    return mileage;
  }

  public void setMileage(Double mileage) {
    this.mileage = mileage;
  }

  public BigDecimal getDrawMoney() {
    if (null != drawMoney) {
      return drawMoney.setScale(2, BigDecimal.ROUND_HALF_UP);
    }
    return drawMoney;
  }

  public void setDrawMoney(BigDecimal drawMoney) {
    this.drawMoney = drawMoney;
  }

  public BigDecimal getNodrawMoney() {
    return nodrawMoney;
  }

  public void setNodrawMoney(BigDecimal nodrawMoney) {
    this.nodrawMoney = nodrawMoney;
  }

  public BigDecimal getFrozenMoney() {
    return frozenMoney;
  }

  public void setFrozenMoney(BigDecimal frozenMoney) {
    this.frozenMoney = frozenMoney;
  }

  public BigDecimal getReceiptMoney() {
    return receiptMoney;
  }

  public void setReceiptMoney(BigDecimal receiptMoney) {
    this.receiptMoney = receiptMoney;
  }

  public String getMemberEcn() {
    return memberEcn;
  }

  public void setMemberEcn(String memberEcn) {
    this.memberEcn = memberEcn;
  }

  public String getMemberEcp() {
    return memberEcp;
  }

  public void setMemberEcp(String memberEcp) {
    this.memberEcp = memberEcp;
  }



}
